/**
 * The multiplayer management package of the application.
 */
package fr.umlv.m2.android.quizz.multiplayer;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.Toast;

/**
 * This activity displays a form used to create a new game.
 * 
 * @author Gambouele Bertrand.
 * @author Viravout Alexandre.
 *
 */
public class MultiplayerCreateGameActivity extends Activity {

	private Spinner gameLevelSpinner;
	
	private OnItemSelectedListener itemSelectedListener;
	
	private Button createGameButton;
	
	private OnClickListener clickHandler;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		//this.setContentView(R.layout.multiplayer_create_game);
		
		//this.gameLevelSpinner = (Spinner)findViewById(R.id.multiplayerCreateGameLevelSpinner);
		//this.createGameButton = (Button)findViewById(R.id.multiplayerCreateGameButton);
		
		this.itemSelectedListener = new OnItemSelectedListener() {
			@Override
			public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
				// TODO A faire		parent.getItemAtPosition(position).toString();
			}
			
			@Override
			public void onNothingSelected(AdapterView<?> arg0) {
				// TODO A faire
			}
		};
		
		this.gameLevelSpinner.setOnItemSelectedListener(itemSelectedListener);
		
		this.clickHandler = new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO BLUETOOTH Lancer le bluetooth	intent = new Intent(MultiplayerCreateGameActivity.this, );
				Toast.makeText(MultiplayerCreateGameActivity.this, "On va lancer le bluetooth", Toast.LENGTH_LONG);
			}
		};
		
		this.createGameButton.setOnClickListener(clickHandler);
	}
}
